/*
 * @Description: 
 * @Version: 2.0
 * @Autor: Seven
 * @Date: 2020-11-26 14:29:56
 * @LastEditors: Seven
 * @LastEditTime: 2020-12-09 14:09:10
 */
import Vue from 'vue'
// import Element from 'element-ui'

import {
  Container,
  Header,
  Aside,
  Main,
  Footer,
  Menu,
  MenuItem,
  Button,
  Form,
  FormItem,
  Input,
  Row,
  Col,
  Pagination,
  Avatar,
  Tabs,
  TabPane,
  Dialog,
  Message,
  MessageBox,
  Loading,
  Dropdown,
  DropdownMenu,
  DropdownItem
} from 'element-ui'
import locale from 'element-ui/lib/locale/lang/en'

const components = [
  Container,
  Header,
  Aside,
  Footer,
  Main,
  Menu,
  MenuItem,
  Button,
  Form,
  FormItem,
  Input,
  Row,
  Col,
  Pagination,
  Avatar,
  Tabs,
  TabPane,
  Dialog,
];
const Element = {
  install:function(Vue) {
    components.forEach(component=>{
      console.log(component.name,'component.name')
      Vue.component(component.name,component)
    })
  }
}

Vue.use(Element, { locale });
Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$loading = Loading;
